package com.cq.hd.member.api;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.member.api.dto.FeedbackPageDto;
import com.cq.hd.member.api.dto.FeedbackSaveDto;
import com.cq.hd.member.api.vo.FeedbackPageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "hd-o2o-member-service", contextId = "feedback-api")
public interface TbFeedbackApi {

    // 列表
    @GetMapping("/member/feedback/pageFeedback")
    Result<Page<FeedbackPageVo>> pageFeedback(@SpringQueryMap FeedbackPageDto feedbackPageDto);

    // 详情
    @GetMapping("/member/feedback/details")
    Result<FeedbackPageVo> details(@RequestParam("id") Long id);

    // 提交反馈建议
    @PostMapping("/member/feedback/save")
    Result<Boolean> saveFeedback(@RequestBody FeedbackSaveDto feedbackSaveDto);
}
